Single Class

A Single is an intrinsic data type in REALbasic. A Single is a number that can contain a decimal value, i.e., a real number.

Events

None

Properties

None

Methods

None

It can take on a value between -1.175494 e-38 and 3.402823 e+38. In other languages, REALbasic's Single may be referred to as a single precision real number. If you need more precision, you should use a Double instead. Because Singles are numbers, you can perform mathematical calculations on them. Singles use 4 bytes of memory. Other languages refer to a REALbasic Single as a Float. The default value of a Single is 0.0.

The VarType function returns a value of 5 when passed a Single.


Example

The Single and Double data types allow you to store and manage floating point numbers.

Dim s as Single
s=3.1416

See Also

Boolean, Color, Double, Integer, String, data types; -, +, *, /, <, <=, =, >=, >, <>, \, IsNumeric, Mod, Str, Val, VarType functions; Dim statement.